package com.slowfly.rule.engine.constants;

public interface IRiskConstants {

    String SCENE_CHANEL = "slowfly_risk_scene_chanel";

    String STRATEGY_CHANEL = "slowfly_risk_strategy_chanel";

    String RULE_CHANEL = "slowfly_risk_rule_chanel";

    String DECISION_CHANEL = "slowfly_risk_decision_chanel";

    String VARIABLE_NAME = "feature";

    String COLUMN_PREFIX = "id_";

    String VARIABLE_PREFIX = VARIABLE_NAME + "." + COLUMN_PREFIX;

    String RULE_FORMAT = "if (%s) {// %s\n%s}\n";

    String SCRIPT_METHOD = "check";

    String SCRIPT_FORMAT = "package com.slowfly.rule.engine.groovy\n\n" +
            "class Script implements IScript {\n" +
            "  static " + SCRIPT_METHOD + "(def " + VARIABLE_NAME + ") {\n%s" +
            "  }\n" +
            "}";

    String DEFAULT_RULE = "false";

    String RETURN_FORMAT = "return %s// %s";

    String JSON_ARRAY_COLUMN = "list";

    String STRATEGY_FUSE_TOTAL = "slowfly_risk_strategy_fuse_total_%s";

    String STRATEGY_FUSE_RESULT_TYPE = "slowfly_risk_strategy_fuse_result_type_%s_%s";

    String FEATURE_CHANEL = "slowfly_risk_feature_chanel";

    String FEATURE_SCRIPT_METHOD = "getValue";

    String FEATURE_SCRIPT_FORMAT = "class Script { static " + SCRIPT_METHOD + "(def param) { param.%s } }";
}
